<?php
use yii\helpers\Url;
?>
<a href="<?=Url::to(['user/add'])?>">添加用户</a>
<div class="user-index">
    <?php
    foreach ($userList as $item){
        echo $item['username']." ".$item['password']." ".$item['userImg']."<a href=".Url::to(['user/update','id'=>$item['userId']]).">"."修改</a>
           <a href=".Url::to(['user/del','id'=>$item['userId']]).">删除</a> <br />";
    }

    ?>
</div>

